import request from '@/utils/request'

// 订单收入列表
export function getIncome (params) {
  return request({
    params,
    url: '/back/xsFinance/getOrderIncomeList'
  })
}

//提现列表
export function getCashRequestListByPageConitdion (params) {
  return request({
    params,
    method: 'get',
    url: '/xsCashrequest/getCashRequestListByPageConitdion'
  })
}

//新增提现
export function addCashRequest (data) {
  return request({
    data,
    method: 'post',
    url: '/xsCashrequest/addCashRequest'
  })
}

//处理提现记录
export function updateCashRequestStatus (data) {
  return request({
    data,
    method: 'put',
    url: '/xsCashrequest/updateCashRequestStatus'
  })
}

//可提现金额
export function getCashRequestBalance (params) {
  return request({
    params,
    method: 'get',
    url: '/xsCashrequest/getCashRequestBalance'
  })
}

//机柜列表
export function getEquipmentList (params) {
  return request({
    params,
    method: 'get',
    url: '/back/xsEquipment/getEquipmentList'
  })
}

//充电宝列表
export function getBatteryList (params) {
  return request({
    params,
    method: 'get',
    url: '/back/xsBattery/getBatteryList'
  })
}

//办公列表
export function getWorkListByPageCondition (params) {
  return request({
    params,
    method: 'get',
    url: '/back/xsWork/getWorkListByPageCondition'
  })
}

//新增办公
export function addWork (params) {
  return request({
    params,
    method: 'post',
    url: '/back/xsWork/addWork'
  })
}

//逻辑删除办公信息
export function updateWorkIsFlag (data) {
  return request({
    data,
    method: 'put',
    url: '/back/xsWork/updateWorkIsFlag'
  })
}

//办公详情
export function getWorkInfo (params) {
  return request({
    params,
    method: 'get',
    url: '/back/xsWork/getWorkInfo'
  })
}

//修改办公详情
export function updateWork (params) {
  return request({
    params,
    method: 'put',
    url: '/back/xsWork/updateWork'
  })
}

//收入列表
export function getIncomeListByPage (params) {
  return request({
    params,
    method: 'get',
    url: '/back/xsIncome/getIncomeListByPage'
  })
}

//删除收入
export function deleteIncomeById (params) {
  return request({
    params,
    method: 'delete',
    url: '/back/xsIncome/deleteIncomeById'
  })
}

//新增收入
export function addIncome (params) {
  return request({
    params,
    method: 'post',
    url: '/back/xsIncome/addIncome'
  })
}

//修改收入
export function updateIncomeById (params) {
  return request({
    params,
    method: 'put',
    url: '/back/xsIncome/updateIncomeById'
  })
}

// 押金退还列表
export function userBackList (params) {
  return request({
    params,
    url: '/back/xsRecharge/getDepositList'
  })
}


// 查询押金
export function selectDeposite (params) {
  return request({
    params,
    url: '/sys/back/wxSystem/selectDeposit'
  })
}


//押金设置
export function putDeposit (data) {
  return request({
    data,
    method: 'put',
    url: '/sys/back/wxSystem/putDeposit'
  })
}

//查询提现列表

export function findByConditionPage (params) {
  return request({
    params,
    method: 'get',
    url: '/sys/back/wxCashrequest/findByConditionPage'
  })
}

//提现审核
export function isStatus (data) {
  return request({
    data,
    method: 'put',
    url: '/sys/back/wxCashrequest/isStatus'
  })
}


//一般支出列表
export function getGeneralListByPage (params) {
  return request({
    params,
    url: '/back/xsGeneral/getGeneralListByPage'
  })
}

//新增一般支出
export function addGeneral (data) {
  return request({
    data,
    method: 'post',
    url: '/back/xsGeneral/addGeneral'
  })
}

//删除一般支出
export function deleteGeneralById (params) {
  return request({
    params,
    method:'delete',
    url: '/back/xsGeneral/deleteGeneralById'
  })
}

//修改一般支出
export function updateGeneralById (data) {
  return request({
    data,
    method: 'put',
    url: '/back/xsGeneral/updateGeneralById'
  })
}

//人工支出列表
export function getPersonalaufwandListByPage (params) {
  return request({
    params,
    url: '/back/xsPersonalaufwand/getPersonalaufwandListByPage'
  })
}

//新增人工支出
export function addPersonalaufwand (data) {
  return request({
    data,
    method: 'post',
    url: '/back/xsPersonalaufwand/addPersonalaufwand'
  })
}

//删除人工支出
export function deletePersonalaufwandById (params) {
  return request({
    params,
    method:'delete',
    url: '/back/xsPersonalaufwand/deletePersonalaufwandById'
  })
}

//修改人工支出
export function updatePersonalaufwandById (data) {
  return request({
    data,
    method: 'put',
    url: '/back/xsPersonalaufwand/updatePersonalaufwandById'
  })
}

